package com.zhang.goods.vo;

import com.zhang.goods.entity.SkuImags;
import com.zhang.goods.entity.SkuInfo;
import com.zhang.goods.entity.SpuDescImg;
import lombok.Data;

import java.util.List;

@Data
public class SkuItemVo {
    /*获取基本信息：标题，价格等信息*/
    SkuInfo skuInfo;
    /*获取图片信息*/
    List<SkuImags> skuImags;

    /* 获取spu下所有的SKU销售属性组合信息*/
    List<SkuItemSaleAttrVo> skuItemSaleAttrVos;

    /*获取spu介绍*/
    SpuDescImg spuDescImg;

    /* 获取spu的规格参数信息*/
    List<SpuItemAttrGroupVo> groupAttrs;

    /**
     *库存
     */
    Integer skuStock;

    @Data
    public static class SkuItemSaleAttrVo {
        private Long attrId;
        private String attrName;
        private List<AttrValueWithSkuIdVo> attValues;
    }

    @Data
    public static class SpuItemAttrGroupVo {
        private String groupName;
        private List<SpuBaseAttrVo> attrValues;
    }

    @Data
    public static class SpuBaseAttrVo {
        private String attrName;
        private String attrValue;
    }
}
